import request from '@/commen/js/request.js'
const config = {
	global_isTest: false, //是否是测试环境

	global_isPass: false, //是否加密

	global_version: "1", //版本号

	plat: '3', //平台,1安卓，2ios,3其他

	global_aeskey: "YHD6FCtZsqrmVXc2", // 通信秘钥

	host: "https://yizhimao.onebity.com/", //基础域名
	
	baseUrl: "https://yizhimao.onebity.com/api/", 

	global_baseddConnUrl: "https://yizhimao.onebity.com/api/user/", //服务器接口路径
	uploadImg:'upload/upload',//上传
};
export default config

/**
 * 获取首页推荐列表
 * @param {Object} query
 */
export function getRecommendList(query){
	return request({
		controller:"goods/recommend/list",
		method:"POST",
		query
	})
}

/**
 * 获取首页店铺列表
 * @param {Object} query
 */
export function getStoreList(query){
	return request({
		controller:"store/recommend",
		method:"POST",
		query
	})
}

/**
 * 获取个人信息
 * @param {Object} query
 */
export function getUserInfo(query){
	return request({
		controller:"info",
		method:"POST",
		query
	})
}

/**
 * 获取评论列表
 * @param {Object} query
 */
export function getCommentList(query){
	return request({
		controller:"comment/list",
		method:"POST",
		query
	})
}

/**
 * 评论添加
 * @param {Object} query
 */
export function addComment(query){
	return request({
		controller:"comment/add",
		method:"POST",
		query
	})
}

/**
 * 购买会员
 * @param {Object} query
 */
export function buyVip(query){
	return request({
		controller:"purchase/member",
		method:"POST",
		query
	})
}

/**
 * 获取购买的会员信息
 * @param {Object} query
 */
export function getBuyInfo(query){
	return request({
		controller:"member/info",
		method:"POST",
		query
	})
}
	
/**
 * 取消点赞或者点赞
 * @param {Object} query
 */
export function isPraise(query){
	return request({
		controller:"like/goods",
		method:"POST",
		query
	})
}

/**
 * 我点赞的商品
 * @param {Object} query
 */
export function myPraise(query){
	return request({
		controller:"my/like",
		method:"POST",
		query
	})
}

/**
 * 所属门店
 * @param {Object} query
 */
export function myStore(query){
	return request({
		controller:"belong/store",
		method:"POST",
		query
	})
}

/**
 * 发送短信，解绑手机
 * @param {Object} query
 */
export function sendMessage(query){
	return request({
		controller:"send/message",
		method:"POST",
		query
	})
}

/**
 * 验证码验证
 * @param {Object} query
 */
export function verifyCode(query){
	return request({
		controller:"check/code",
		method:"POST",
		query
	})
}	

/**
 * 修改手机号
 * @param {Object} query
 */
export function changeMobile(query){
	return request({
		controller:"edit/phone",
		method:"POST",
		query
	})
}	

/**
 * 意见反馈
 * @param {Object} query
 */
export function commitFeedback(query){
	return request({
		controller:"feedback/add",
		method:"POST",
		query
	})
}

/**
 * 反馈列表
 * @param {Object} query
 */
export function getFeedbackList(query){
	return request({
		controller:"feedback/list",
		method:"POST",
		query
	})
}

/**
 * 积分记录
 * @param {Object} query
 */
export function getIntegralList(query){
	return request({
		controller:"integral/record",
		method:"POST",
		query
	})
}

/**
 * 关于我们
 * @param {Object} query
 */
export function aboutUs(query = {root: true}){
	return request({
		controller:"about/us",
		method:"POST",
		query
	})
}

/**
 * 服务记录
 * @param {Object} query
 */
export function serviceLog(query){
	return request({
		controller:"service/record",
		method:"POST",
		query
	})
}

/**
 * 修改个人信息
 * @param {Object} query
 */
export function editUserinfo(query){
	return request({
		controller:"improve/personal/information",
		method:"POST",
		query
	})
}

/**
 * 获取二维码
 * @param {Object} query
 */
export function getQrCode(query){
	return request({
		controller:"qrCode",
		method:"POST",
		query
	})
}

/**
 * 获取服务详情
 * @param {Object} query
 */
export function getServiceDetail(query){
	return request({
		controller:"service/detail",
		method:"POST",
		query
	})
}

/**
 * 登录
 * @param {Object} query
 */
export function login(query){
	return request({
		controller:"login",
		method:"POST",
		query
	})
}

/**
 * 绑定手机号-微信
 * @param {Object} query
 */
export function bindPhone(query){
	return request({
		controller:"bind/phone",
		method:"POST",
		query
	})
}

/**
 * 分享
 * @param {Object} query
 */
export function goodsShare(query){
	return request({
		controller:"goods/share",
		method:"POST",
		query
	})
}

/**
 * 会员协议
 * @param {Object} query
 */
export function protocol(query){
	return request({
		controller:"protocol",
		method:"POST",
		query
	})
}

// 接口
export function test(query){
	return request({
		controller:"test",
		method:"index",
		query
	})
}
